﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="DB.MVC.Extensions.Compression" %>
<%@ Import Namespace="DB.MVC.Extensions.Compression.Resource" %>

<!DOCTYPE html>

<html>
<head runat="server">
    <title>ASP Script Compression</title>

    <%--Load definied js framework from config file--%>
    <%= Html.CompositeScriptResource_DefinedCompositeScriptResource("JSFramework")%>
   
    <%--load css compressed framework--%>
    <%= Html.CompositeScriptResource_DefinedCompositeScriptResource("CSSFramework")%>

    <%--Load new definition compressed resource list--%>
    <%= Html.CompositeScriptResource_CompositeScript(
           new List<string>() { "~/Scripts/TestScripts/CompressionSwitcher.js" }, 
           "CompressionSwitch", 
           ResourceType.JS) %>

    <%--script include will be compressed--%>
    <%=Html.CompositeScriptResource_RenderScriptTag("~/Scripts/TestScripts/TestObject.js") %>

    <script type="text/javascript">
        $(document).ready(function () {

            var testobj = new TestObject();
            testobj.testmessage();
        });
    </script>
</head>
<body>
    <div>
        Loaded Composite resources successfully
    </div>
    <br />
    <div>
        View the compressed resources by opening Firebug, or resource monitor and view the JS and CSS files downloaded to the client.
    </div>
    <br />
    <div>
        <input type="button" style="width:150px;height:25px;" id="EnableCompression" value="Enable Compression" />
        <br />
        <input type="button" style="width:150px;height:25px;" id="DisableCompression" value="Disable Compression" />
    </div>
    <br />
    <div>
       <%=Html.ActionLink("View Razor Version", "RazorCompositeResource") %>
        
    </div>
</body>
</html>
